<html>

<head>
  <title>Express</title>
  <link rel="stylesheet" href="/stylesheets/style.css">
</head>

<body>
  <h1>消息推送</h1>
  <p>录入下面的信息，想鸿蒙App客户端推送消息</p>
  <div>
    <input type="text" placeholder="请录入消息标题">
  </div>
  <div>
    <input type="text" placeholder="请录入消息副标题">
  </div>
  <div>
    <input type="text" placeholder="请录入目标设备pushToken" >
  </div>
  <button>推送消息</button>
</body>
<script src="./javascripts/axios.min.js"></script>
<script>
  var oBtn = document.querySelector('button')
  var aInput = document.querySelectorAll('input')
  oBtn.onclick = async function(){
    let url = 'http://localhost:3000/push/message'
    let res = await axios.get(url,{
      params:{
        title:aInput[0].value,
        content:aInput[1].value,
        pushToken:aInput[2].value
      }
    })
    console.log(res);
  }
</script>
</html>
